/*
 ============================================================================
 Name        : odump.h
 Author      : Agustin Pivetta, Diego Rivas
 Version     : 1.0
 Description : Tp1 66.20: funciones y estructuras de datos auxiliares para 
	       realizar los cómputos de encoding y decoding
 ============================================================================
*/ 
#include <stdio.h>
#include <stdlib.h>

//Estructura de opciones
struct odump_opts {
	size_t length;
	const char* delim;
};

//Vector de mensages de error
extern const char* odump_errmsg[];

//Prototipos de funciones
int odump_encode(int infd, int outfd, struct odump_opts *opts);
int odump_decode(int infd, int outfd, struct odump_opts *opts);
void bin2oc(unsigned char bin, char* octal);
unsigned char oc2bin(char octal[]);
size_t write_asm(int fildes, const void *buf, size_t nbytes);
ssize_t read_asm(int fildes, void *buf, size_t nbyte);
size_t strlen_asm(const char *str);
